<?php

namespace pay\modules\backend\models;

use Yii;

/**
 * This is the model class for table "pay_reward_record".
 *
 * @property int $id
 * @property int $app_id
 * @property string $openid
 * @property string $nickname
 * @property string $name
 * @property string $phone
 * @property string $amount
 * @property string $source
 * @property string $ip
 * @property int $amount_num
 * @property string $other_info
 * @property string $create_time
 */
class RewardRecord extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'pay_reward_record';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['app_id', 'openid'], 'required'],
            [['app_id', 'amount_num'], 'integer'],
            [['create_time'], 'safe'],
            [['openid', 'ip'], 'string', 'max' => 32],
            [['nickname'], 'string', 'max' => 255],
            [['name', 'amount'], 'string', 'max' => 64],
            [['phone'], 'string', 'max' => 11],
            [['source'], 'string', 'max' => 125],
            [['other_info'], 'string', 'max' => 1024],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'app_id' => 'App ID',
            'openid' => 'Openid',
            'nickname' => 'Nickname',
            'name' => 'Name',
            'phone' => 'Phone',
            'amount' => 'Amount',
            'source' => 'Source',
            'ip' => 'Ip',
            'amount_num' => 'Amount Num',
            'other_info' => 'Other Info',
            'create_time' => 'Create Time',
        ];
    }
}
